<?php 
	$linkStart = $this->currentUrl . '/page/' . $this->first; 
	$linkPrevious = '#';
	
	// $this->previous is page front current page
	if(isset($this->previous)) {
		$linkPrevious = $this->currentUrl . '/page/' . $this->previous;
	}
	
	$linkNext = '#';
	
	// $this->next is page after current page
	if(isset($this->next)) {
		$linkNext = $this->currentUrl . '/page/' . $this->next;
	}
	
	$linkEnd = $this->currentUrl . '/page/' . $this->last; 
	
	$strPage = '';
	
	// $this->pagesInRange is array number page display 
	// $this->current is current page display
	foreach ($this->pagesInRange as $key) {
		if($this->current == $key){
			$strPage .='<span>' . $key .'</span>'; 
		}else {
			$linkPage  = $this->currentUrl . '/page/' . $key;
			$strPage  .= '<a href="' . $linkPage . '">' . $key .'</a>'; 
		}
	}
	
	$page = 'Page ' . $this->current .' Of ' . $this->last; 
?>

<div class="button2-right">
	<div class="start">		
		<a href="<?php echo $linkStart;?>" title="Start">Start</a>		
	</div>
</div>

<div class="button2-right">
	<div class="prev">
		<a href="<?php echo $linkPrevious;?>" title="Prev" >Prev</a>
	</div>
</div>

<div class="button2-left">
	<div class="page">
		<?php echo $strPage;?>
	
	</div>
</div>

<div class="button2-left">
	<div class="end">
		<a href="<?php echo $linkNext;?>" title="Next" >Next</a>
	</div>
</div>

<div class="button2-left">
	<div class="end">
		<a href="<?php echo $linkEnd;?>" title="End" >End</a>
	</div>
</div>
<div class="limit">
	<?php echo $page;?>
</div>
